package com.colin.controller;

import com.colin.pojo.JiQi;
import com.colin.service.JiQiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("jiqi")
public class JiQiController {
    @Autowired
    JiQiService jiQiService;
    @RequestMapping("insert")
    public String insert (JiQi jiQi) {
        jiQiService.insert(jiQi);
        return "forward:/web/tiaoZhuan2";
    }
    @RequestMapping("delete")
    public String insert (Integer id) {
        jiQiService.delete(id);
        return "forward:/web/tiaoZhuan2";
    }
}
